﻿Ext.ControllerManager = new Ext.AbstractManager({
    
    //创建Ext.Controller实例
    register: function (id, options) {
        options.id = id;

        Ext.applyIf(options, {
            application: Ext.ApplicationManager.currentApplication
        });

        var controller = new Ext.Controller(options);

        if (controller.init) {
            controller.init();
        }

        this.all.add(controller);

        return controller;
    }
});


Ext.regController = function () {
    return Ext.ControllerManager.register.apply(Ext.ControllerManager, arguments);
};